package com.zyg.pojo;

import java.util.Objects;

public class User {
    private Integer id;
    private String name;
    private Integer age;
    private Boolean female;
    private Integer score;
    private Account account;

    public User() {
    }

    public User(Integer id, String name, Integer age) {
        this.id = id;
        this.name = name;
        this.age = age;
    }

    public User(Integer id, String name, Integer age, Boolean female, Integer score, Account account) {
        this.id = id;
        this.name = name;
        this.age = age;
        this.female = female;
        this.score = score;
        this.account = account;
    }

    public User(Integer id, String name, Integer age, Boolean female) {
        this.id = id;
        this.name = name;
        this.age = age;
        this.female = female;
    }

    public User(Integer id, String name, Integer age, Boolean female, Integer score) {
        this.id = id;
        this.name = name;
        this.age = age;
        this.female = female;
        this.score = score;
    }

    public Account getAccount() {
        return account;
    }

    public void setAccount(Account account) {
        this.account = account;
    }

    public Integer getScore() {
        return score;
    }

    public void setScore(Integer score) {
        this.score = score;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Boolean getFemale() {
        return female;
    }

    public void setFemale(Boolean female) {
        this.female = female;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", female=" + female +
                ", score=" + score +
                ", account=" + account +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        User user = (User) o;
        return Objects.equals(id, user.id) &&
                Objects.equals(name, user.name) &&
                Objects.equals(age, user.age) &&
                Objects.equals(female, user.female) &&
                Objects.equals(score, user.score) &&
                Objects.equals(account, user.account);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, age, female, score, account);
    }
}
